<template>
    <div class="trade">
        <gltitle :titleSize="titleSize" :is_mt="is_mt" v-if="!$store.state.isApp"></gltitle>
        <div class="trade-con">
            <div class="trade-info">
                <div class="tips">{{ $t('new.desc29') }}</div>
                <div class="trade-btn">
                    <div>{{ $t('new.desc7') }}</div>
                    <p @click="showSet=true">{{ $t('new.desc30') }}<van-icon name="arrow" /></p>
                </div>
            </div>
        </div>
        <setTrade :hasTrue="info.hasSetPassword" v-if="showSet" :showSet="showSet" @handlerClose="handlerClose"></setTrade>
    </div>
</template>

<script>
export default {
    data() {
        return {
            titleSize: this.$t('new.desc7'),
            is_mt: true,
            info:{},
            showSet:false
        }
    },
    mounted() {
        this.$post(this.URL.member.personal, {}).then(res => {
            if (res.code == 0) {
                this.info = res.data
            } else {
                this.$toast(res.message)
            }
        })
    },
    methods:{
        handlerClose() {
            this.showSet=false;
             this.$post(this.URL.member.personal, {}).then(res => {
            if (res.code == 0) {
                this.info = res.data
            } else {
                this.$toast(res.message)
            }
        })
        }
    }
}
</script>

<style lang="less" scoped>
.trade {

    .trade-con {
        padding: 1.08rem 0 0;

        .trade-info {
            padding: .32rem;
            background: #fff;

            .tips {
                font-size: .28rem;
                color: #333333;
                line-height: .3rem;
            }

            .trade-btn {
                margin-top: .36rem;
                display: flex;
                justify-content: space-between;
                div{
                    font-size: .28rem;
                    color: #151515;
                    font-weight: 550;
                }
                p{
                    font-size: .28rem;
                }
            }
        }
    }
}
</style>
